package edu.gatech.cc.concolic.expression;



public abstract class UnaryOperator implements SymbolicExpression {

	protected final SymbolicExpression expression;
		
	public UnaryOperator(SymbolicExpression expression) {
		this.expression = expression;
	}
	
	public SymbolicExpression expression() {
		return expression;
	}
	
	public abstract String toString();

	public int hashCode() {
		int result = 17;
		result = 37 * result + expression.hashCode();
		return result;
	}

	public boolean equals(Object o) {
		if (this == o) return true;
		if (o == null || !(getClass().isInstance(o))) return false;

		UnaryOperator other = (UnaryOperator) o;

		return expression.equals(other.expression);
	}
	
}
